<?php
/**
 * Created by Silent Night.
 * User: Silent Night
 * Date: 2017/9/26
 * Time: 11:13
 */

namespace app\api\controller;

use think\cache\driver\Redis;
use think\Controller;

use app\api\model;
use think\Exception;
use think\Route;


class Routedemo extends Controller
{

    public function hello($name)
    {

        return 'hello,' . $name;
    }

    public function nihao($name)
    {
        return 'dsf,' . $name;
    }

    public function demo1()
    {
        session("name","zhangshan",'WWWWW');
        return 'demo1' ;
    }
    public function demo2($name)
    {
        echo session("name","",'WWWWW');
        print_r($_SESSION);
        return 'demo2'.$name ;
    }
    public function demo3($bool)
    {
        return 'demo3' ;
    }

    public function demo4($id)
    {
        return 'demo3'.$id ;
    }
    public function demo5($username)
    {
        return $username.":homepage" ;
    }
}